3.1263 \(\int \frac {x (a+b \tan ^{-1}(c x))^2}{d+e x^2} \, dx\)

Optimal. Leaf size=492 \[ -\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e}-\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}-i \sqrt {e}\right )}\right )}{2 e}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}+i \sqrt {e}\right )}\right )}{2 e}+\frac {i b \text {Li}_2\left (1-\frac {2}{1-i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )}{e}-\frac {\log \left (\frac {2}{1-i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )^2}{e}+\frac {b^2 \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e}+\frac {b^2 \text {Li}_3\left (1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e}-\frac {b^2 \text {Li}_3\left (1-\frac {2}{1-i c x}\right )}{2 e} \]

[Out]

-(a+b*arctan(c*x))^2*ln(2/(1-I*c*x))/e+1/2*(a+b*arctan(c*x))^2*ln(2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)
^(1/2)-I*e^(1/2)))/e+1/2*(a+b*arctan(c*x))^2*ln(2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))
/e+I*b*(a+b*arctan(c*x))*polylog(2,1-2/(1-I*c*x))/e-1/2*I*b*(a+b*arctan(c*x))*polylog(2,1-2*c*((-d)^(1/2)-x*e^
(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/e-1/2*I*b*(a+b*arctan(c*x))*polylog(2,1-2*c*((-d)^(1/2)+x*e^(1/2))/
(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/e-1/2*b^2*polylog(3,1-2/(1-I*c*x))/e+1/4*b^2*polylog(3,1-2*c*((-d)^(1/2)-x
*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/e+1/4*b^2*polylog(3,1-2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-
d)^(1/2)+I*e^(1/2)))/e

________________________________________________________________________________________

Rubi [A]  time = 0.25, antiderivative size = 492, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {4980, 4858} \[ -\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}-i \sqrt {e}\right )}\right )}{2 e}-\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}+i \sqrt {e}\right )}\right )}{2 e}+\frac {i b \text {PolyLog}\left (2,1-\frac {2}{1-i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )}{e}+\frac {b^2 \text {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}-i \sqrt {e}\right )}\right )}{4 e}+\frac {b^2 \text {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}+i \sqrt {e}\right )}\right )}{4 e}-\frac {b^2 \text {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 e}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}-i \sqrt {e}\right )}\right )}{2 e}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}+i \sqrt {e}\right )}\right )}{2 e}-\frac {\log \left (\frac {2}{1-i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )^2}{e} \]

Antiderivative was successfully verified.

[In]

Int[(x*(a + b*ArcTan[c*x])^2)/(d + e*x^2),x]

[Out]

-(((a + b*ArcTan[c*x])^2*Log[2/(1 - I*c*x)])/e) + ((a + b*ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*
Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(2*e) + ((a + b*ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[
-d] + I*Sqrt[e])*(1 - I*c*x))])/(2*e) + (I*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - 2/(1 - I*c*x)])/e - ((I/2)*b*(
a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/e - ((
I/2)*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))]
)/e - (b^2*PolyLog[3, 1 - 2/(1 - I*c*x)])/(2*e) + (b^2*PolyLog[3, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d
] - I*Sqrt[e])*(1 - I*c*x))])/(4*e) + (b^2*PolyLog[3, 1 - (2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e
])*(1 - I*c*x))])/(4*e)

Rule 4858

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^2/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTan[c*x])^2*Log[2/
(1 - I*c*x)])/e, x] + (Simp[((a + b*ArcTan[c*x])^2*Log[(2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/e, x] + Sim
p[(I*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - 2/(1 - I*c*x)])/e, x] - Simp[(I*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 -
 (2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/e, x] - Simp[(b^2*PolyLog[3, 1 - 2/(1 - I*c*x)])/(2*e), x] + Simp
[(b^2*PolyLog[3, 1 - (2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/(2*e), x]) /; FreeQ[{a, b, c, d, e}, x] && Ne
Q[c^2*d^2 + e^2, 0]

Rule 4980

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> With
[{u = ExpandIntegrand[(a + b*ArcTan[c*x])^p, (f*x)^m*(d + e*x^2)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b,
 c, d, e, f, m}, x] && IntegerQ[q] && IGtQ[p, 0] && ((EqQ[p, 1] && GtQ[q, 0]) || IntegerQ[m])

Rubi steps

\begin {align*} \int \frac {x \left (a+b \tan ^{-1}(c x)\right )^2}{d+e x^2} \, dx &=\int \left (-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 \sqrt {e} \left (\sqrt {-d}-\sqrt {e} x\right )}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 \sqrt {e} \left (\sqrt {-d}+\sqrt {e} x\right )}\right ) \, dx\\ &=-\frac {\int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{\sqrt {-d}-\sqrt {e} x} \, dx}{2 \sqrt {e}}+\frac {\int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{\sqrt {-d}+\sqrt {e} x} \, dx}{2 \sqrt {e}}\\ &=-\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1-i c x}\right )}{e}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e}+\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1-i c x}\right )}{e}-\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e}-\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e}-\frac {b^2 \text {Li}_3\left (1-\frac {2}{1-i c x}\right )}{2 e}+\frac {b^2 \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e}+\frac {b^2 \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 9.28, size = 1529, normalized size = 3.11 \[ \text {result too large to display} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(x*(a + b*ArcTan[c*x])^2)/(d + e*x^2),x]

[Out]

((8*I)*a*b*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*ArcTan[(c*e*x)/Sqrt[c^2*d*e]] - 8*a*b*ArcTan[c*x]*Log[1 + E^((2*I
)*ArcTan[c*x])] - 4*b^2*ArcTan[c*x]^2*Log[1 + E^((2*I)*ArcTan[c*x])] + 2*b^2*ArcTan[c*x]^2*Log[1 + ((c*Sqrt[d]
 - Sqrt[e])*E^((2*I)*ArcTan[c*x]))/(c*Sqrt[d] + Sqrt[e])] + 2*b^2*ArcTan[c*x]^2*Log[1 + ((c*Sqrt[d] + Sqrt[e])
*E^((2*I)*ArcTan[c*x]))/(c*Sqrt[d] - Sqrt[e])] - 2*b^2*ArcTan[c*x]^2*Log[1 + ((c^2*d + e - 2*Sqrt[c^2*d*e])*E^
((2*I)*ArcTan[c*x]))/(c^2*d - e)] - 4*a*b*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*Log[1 + ((c^2*d + e + 2*Sqrt[c^2*d
*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e)] + 4*a*b*ArcTan[c*x]*Log[1 + ((c^2*d + e + 2*Sqrt[c^2*d*e])*E^((2*I)*A
rcTan[c*x]))/(c^2*d - e)] - 4*b^2*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*ArcTan[c*x]*Log[1 + ((c^2*d + e + 2*Sqrt[c
^2*d*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e)] + 2*b^2*ArcTan[c*x]^2*Log[1 + ((c^2*d + e + 2*Sqrt[c^2*d*e])*E^((
2*I)*ArcTan[c*x]))/(c^2*d - e)] + 4*a*b*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*Log[(-2*Sqrt[c^2*d*e]*E^((2*I)*ArcTa
n[c*x]) + e*(-1 + E^((2*I)*ArcTan[c*x])) + c^2*d*(1 + E^((2*I)*ArcTan[c*x])))/(c^2*d - e)] + 4*a*b*ArcTan[c*x]
*Log[(-2*Sqrt[c^2*d*e]*E^((2*I)*ArcTan[c*x]) + e*(-1 + E^((2*I)*ArcTan[c*x])) + c^2*d*(1 + E^((2*I)*ArcTan[c*x
])))/(c^2*d - e)] + 4*b^2*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*ArcTan[c*x]*Log[(-2*Sqrt[c^2*d*e]*E^((2*I)*ArcTan[
c*x]) + e*(-1 + E^((2*I)*ArcTan[c*x])) + c^2*d*(1 + E^((2*I)*ArcTan[c*x])))/(c^2*d - e)] + 4*b^2*ArcTan[c*x]^2
*Log[(-2*Sqrt[c^2*d*e]*E^((2*I)*ArcTan[c*x]) + e*(-1 + E^((2*I)*ArcTan[c*x])) + c^2*d*(1 + E^((2*I)*ArcTan[c*x
])))/(c^2*d - e)] - 4*b^2*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*ArcTan[c*x]*Log[((2*I)*c^2*d - (2*I)*Sqrt[c^2*d*e]
 + 2*c*(-e + Sqrt[c^2*d*e])*x)/((c^2*d - e)*(I + c*x))] - 2*b^2*ArcTan[c*x]^2*Log[((2*I)*c^2*d - (2*I)*Sqrt[c^
2*d*e] + 2*c*(-e + Sqrt[c^2*d*e])*x)/((c^2*d - e)*(I + c*x))] + 2*a^2*Log[d + e*x^2] + 4*b^2*ArcSin[Sqrt[(c^2*
d)/(c^2*d - e)]]*ArcTan[c*x]*Log[1 + ((c^2*d + e + 2*Sqrt[c^2*d*e])*(Cos[2*ArcTan[c*x]] + I*Sin[2*ArcTan[c*x]]
))/(c^2*d - e)] - 2*b^2*ArcTan[c*x]^2*Log[1 + ((c^2*d + e + 2*Sqrt[c^2*d*e])*(Cos[2*ArcTan[c*x]] + I*Sin[2*Arc
Tan[c*x]]))/(c^2*d - e)] + (4*I)*b*(a + b*ArcTan[c*x])*PolyLog[2, -E^((2*I)*ArcTan[c*x])] - (2*I)*b^2*ArcTan[c
*x]*PolyLog[2, ((-(c*Sqrt[d]) + Sqrt[e])*E^((2*I)*ArcTan[c*x]))/(c*Sqrt[d] + Sqrt[e])] - (2*I)*b^2*ArcTan[c*x]
*PolyLog[2, -(((c*Sqrt[d] + Sqrt[e])*E^((2*I)*ArcTan[c*x]))/(c*Sqrt[d] - Sqrt[e]))] - (2*I)*a*b*PolyLog[2, ((-
(c^2*d) - e + 2*Sqrt[c^2*d*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e)] - (2*I)*a*b*PolyLog[2, -(((c^2*d + e + 2*Sq
rt[c^2*d*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e))] - 2*b^2*PolyLog[3, -E^((2*I)*ArcTan[c*x])] + b^2*PolyLog[3,
((-(c*Sqrt[d]) + Sqrt[e])*E^((2*I)*ArcTan[c*x]))/(c*Sqrt[d] + Sqrt[e])] + b^2*PolyLog[3, -(((c*Sqrt[d] + Sqrt[
e])*E^((2*I)*ArcTan[c*x]))/(c*Sqrt[d] - Sqrt[e]))])/(4*e)

________________________________________________________________________________________

fricas [F]  time = 0.48, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b^{2} x \arctan \left (c x\right )^{2} + 2 \, a b x \arctan \left (c x\right ) + a^{2} x}{e x^{2} + d}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="fricas")

[Out]

integral((b^2*x*arctan(c*x)^2 + 2*a*b*x*arctan(c*x) + a^2*x)/(e*x^2 + d), x)

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

maple [F]  time = 19.69, size = 0, normalized size = 0.00 \[ \int \frac {x \left (a +b \arctan \left (c x \right )\right )^{2}}{e \,x^{2}+d}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*arctan(c*x))^2/(e*x^2+d),x)

[Out]

int(x*(a+b*arctan(c*x))^2/(e*x^2+d),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {a^{2} \log \left (e x^{2} + d\right )}{2 \, e} + \int \frac {b^{2} x \arctan \left (c x\right )^{2} + 2 \, a b x \arctan \left (c x\right )}{e x^{2} + d}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="maxima")

[Out]

1/2*a^2*log(e*x^2 + d)/e + integrate((b^2*x*arctan(c*x)^2 + 2*a*b*x*arctan(c*x))/(e*x^2 + d), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {x\,{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{e\,x^2+d} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(a + b*atan(c*x))^2)/(d + e*x^2),x)

[Out]

int((x*(a + b*atan(c*x))^2)/(d + e*x^2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x \left (a + b \operatorname {atan}{\left (c x \right )}\right )^{2}}{d + e x^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*atan(c*x))**2/(e*x**2+d),x)

[Out]

Integral(x*(a + b*atan(c*x))**2/(d + e*x**2), x)

________________________________________________________________________________________